package com.sali.web;

import com.sali.bean.SysUser;
import com.sali.mapper.SysUserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Description:
 * Author: Zhang Hang
 * Version: 1.0
 * Create Date Time: 2022/4/27 09:40.
 * Update Date Time:
 *
 * @see
 */
@RestController
@Slf4j
public class IndexController {

    @Resource
    private SysUserMapper sysUserMapper;

    @GetMapping("/index")
    public String index() {
        return "Hello, Salieri.";
    }

    @GetMapping("/getuser/{id}")
    public SysUser getuser(@PathVariable(value = "id") Integer id) {
        return sysUserMapper.selectById(id);
    }

}
